<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 微信分享设置 -->
    <meta property="og:title" content="新月的生日派对邀请函">
    <meta property="og:description" content="诚挚邀请您参加新月的11岁生日派对！">
    <meta property="og:image" content="images/bg.png">
    <meta name="description" content="诚挚邀请您参加新月的11岁生日派对！">
    <title>生日派对邀请函</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: #7d130b;
            font-family: "Microsoft YaHei", sans-serif;
        }
        .invitation-container {
            width: 100%;
            max-width: 600px;
            margin: 20px;
            position: relative;
        }
        .envelope-bg {
            width: 100%;
            height: auto;
            display: block;
        }
        .content {
            position: absolute;
            top: 40%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 0 40px;
            width: 70%;
            text-align: center;
            color: #000;
        }
        .title {
            color: #FFD700;
            font-size: 28px;
            margin-bottom: 20px;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        }
        .details {
            color: #000;
            line-height: 1.8;
            margin: 20px 0;
            text-shadow: none;
            text-align: left;
            text-indent: 2em;
        }
        .details p {
            margin: 10px 0;
        }
        .highlight {
            color: #FFD700;
            font-weight: bold;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
            text-indent: 0;
        }
        .highlight:last-child {
            margin-top: 50px;
        }
        .emoji {
            font-size: 20px;
        }
        .nav-link {
            color: #4A90E2;
            text-decoration: underline;
            cursor: pointer;
            margin-left: 10px;
            font-size: 0.9em;
        }
        .nav-link:hover {
            color: #357ABD;
        }
        /* 分享按钮样式 */
        .share-button {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: #FFD700;
            color: #000;
            padding: 10px 20px;
            border-radius: 20px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            cursor: pointer;
            z-index: 1000;
            font-weight: bold;
        }
        /* 二维码弹窗样式 */
        .qr-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.8);
            z-index: 1001;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
        .qr-content {
            background: white;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
        }
        .qr-close {
            color: white;
            font-size: 24px;
            position: absolute;
            top: 20px;
            right: 20px;
            cursor: pointer;
        }
        .share-tips {
            color: white;
            margin-top: 20px;
            font-size: 16px;
            text-align: center;
        }
        /* 移动端响应式样式 */
        @media screen and (max-width: 768px) {
            .invitation-container {
                margin: 10px;
            }
            .content {
                width: 85%;
                padding: 0 20px;
            }
            .title {
                font-size: 24px;
            }
            .details {
                font-size: 16px;
                line-height: 1.6;
            }
            .highlight:last-child {
                margin-top: 80px;
            }
        }
        @media screen and (max-width: 480px) {
            .content {
                width: 90%;
                padding: 0 15px;
            }
            .title {
                font-size: 20px;
            }
            .details {
                font-size: 14px;
            }
            .highlight:last-child {
                margin-top: 60px;
            }
            .nav-link {
                display: block;
                margin-top: 5px;
                margin-left: 0;
            }
        }
    </style>
</head>
<body>
    <div class="invitation-container">
        <img src="images/bg.png" alt="邀请函背景" class="envelope-bg">
        <div class="content">
            <div class="title">生日狂欢聚餐邀请函</div>
            <div class="details">
                <p>嘿，小伙伴们！</p>
                <p>猜猜谁的生日要到了？没错，就是那个聪明伶俐、帅气逼人的华昕岳！她即将迎来自己的第十一个超级英雄年头，而你呢？将被荣幸地邀请成为这场狂欢盛宴的一员！</p>
                
                <p class="highlight">
                    📅 日期：2025年1月15日<br>
                    🕒 时间：中午11点半开始<br>
                    📍 地点：海底捞（县前西街108号）<a href="https://uri.amap.com/marker?position=120.578605,30.002433&name=海底捞火锅(县前西街店)" target="_blank" class="nav-link">【导航】</a>
                </p>

                <p>我们准备了：</p>
                <p>
                    🍔 美味可口的火锅让我们味蕾尽情跳舞！<br>
                    🎮 趣味横生的游戏，让我们成为超级搭档！
                </p>

                <p>还有更多惊喜等你来发现哦！记得穿上你最酷的衣服，带上你最灿烂的笑容，我们不见不散！</p>
                
                <p class="highlight">快来加入这场超级欢乐的生日派对吧！让我们一起嗨翻天！</p>
            </div>
        </div>
    </div>

    <!-- 分享按钮 -->
    <div class="share-button" onclick="showQR()">
        分享邀请函 📤
    </div>

    <!-- 二维码弹窗 -->
    <div class="qr-modal" id="qrModal" onclick="hideQR()">
        <div class="qr-close">×</div>
        <div class="qr-content" onclick="event.stopPropagation()">
            <h3>分享邀请函</h3>
            <div id="qrcode"></div>
            <p class="share-tips">
                1. 点击右上角菜单<br>
                2. 选择"分享给朋友"或"分享到朋友圈"
            </p>
        </div>
    </div>

    <!-- QR码生成脚本 -->
    <script src="https://cdn.jsdelivr.net/npm/qrcodejs2@0.0.2/qrcode.min.js"></script>
    <script>
        // 显示二维码弹窗
        function showQR() {
            const modal = document.getElementById('qrModal');
            const qrcodeDiv = document.getElementById('qrcode');
            modal.style.display = 'flex';
            
            // 清除已存在的二维码
            qrcodeDiv.innerHTML = '';
            
            // 创建新的二维码
            new QRCode(qrcodeDiv, {
                text: window.location.href,
                width: 200,
                height: 200,
                colorDark: "#000000",
                colorLight: "#ffffff",
                correctLevel: QRCode.CorrectLevel.H
            });
        }
        
        // 隐藏二维码弹窗
        function hideQR() {
            document.getElementById('qrModal').style.display = 'none';
        }
        
        // 检测是否在微信浏览器中
        function isWechat() {
            return /MicroMessenger/i.test(navigator.userAgent);
        }
        
        // 页面加载完成后
        window.onload = function() {
            const shareButton = document.querySelector('.share-button');
            const shareTips = document.querySelector('.share-tips');
            
            if (isWechat()) {
                shareTips.innerHTML = '点击右上角菜单<br>选择"分享给朋友"或"分享到朋友圈"';
            } else {
                shareTips.innerHTML = '长按二维码保存图片<br>或直接复制链接分享';
            }
        }
    </script>
</body>
</html> 